<!--轮播走马灯组件-->
<template>
  <div class="bersatu">
    <div class="block">
      <el-carousel indicator-position="outside">
        <el-carousel-item v-for="item in imgList" :key="item.id">
          <!-- <h3 >{{ item }}</h3> -->
          <img :src="item.url" alt="找不到图片" />
        </el-carousel-item>
      </el-carousel>
    </div>
  </div>
</template>

<script>
export default {
  name: "berysatu",
  components: {},
  data() {
    //这里存放数据
    return {
      imgList: [
        {
          id: "1",
          url: require("../assets/img/0.webp"),
        },
        {
          id: "2",
          url: require("../assets/img/1.webp"),
        },
        {
          id: "3",
          url: require("../assets/img/2.webp"),
        },
        {
          id: "4",
          url: require("../assets/img/3.webp"),
        },
      ],
    };
  },
};
</script>
<style scoped>
.bersatu {
  z-index: 20;
}
.block {
  height: 460px;
}
.el-carousel__item h3 {
  color: #475669;
  font-size: 18px;
  opacity: 0.75;
  line-height: 300px;
  margin: 0;
}
.el-carousel >>> .el-carousel__arrow--left {
  left: 234px;
}
.el-carousel >>> .el-carousel__arrow--right {
  right: 0;
}
.el-carousel >>> .el-carousel__indicators--outside {
  bottom: 32px;
  text-align: right;
  position: relative;
  transform: none;
}
.el-carousel >>> .el-carousel__indicators--horizontal {
  left: auto;
  width: 200px;
  float: right;
  right: 30px;
  bottom: 32px;
  display: inline-block;
}
.el-carousel__indicator >>> .el-carousel__indicator--horizontal :is-active {
  background: hsla(0, 0%, 100%, 0.4);
  border-color: rgba(0, 0, 0, 0.4);
}
.el-carousel >>> .el-carousel__button {
  opacity: 0.48;
  width: 8px;
  height: 8px;
  border-radius: 10px;
  background-color: rgb(19, 3, 3);
  border: none;
  outline: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  transition: 0.4s;
}
.el-carousel >>> .el-carousel__indicator--horizontal {
  list-style-type: square;
  margin: 0 4px;
}
.el-carousel >>> .el-carousel__container {
  height: 460px;
}
.el-carousel >>> .el-carousel__arrow {
  border: none;
  outline: 0;
  padding: 0;
  margin: 0;
  height: 68px;
  width: 36px;
  cursor: pointer;
  transition: 0.3s;
  border-radius: 5%;
  background-color: rgb(31 45 61 / 38%);
  color: #fff;
  position: absolute;
  top: 50%;
  z-index: 10;
  transform: translateY(-50%);
  text-align: center;
  font-size: 12px;
}
.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n + 1) {
  background-color: #d3dce6;
}
</style>
